package com.example.demo

class HelloWorld {
    public static void main(String[] args){
        println("first")
        def proc = "ls".execute()
        def test = "ls -l".execute()
        def b = new StringBuffer()
        proc.consumeProcessErrorStream(b)

        println("==========")
        println(test.text)
        println("==========")
        println proc.text
        println b.toString()
        def my_list = []
        "ls".execute().text.readLines().each {
            println("=========")
            my_list.add(it)
            println it
        }

        "date".execute().text.readLines().each {
            println("=========")
            my_list.add(it)
            println it
        }
        println(my_list)


//        return my_list
    }

def test(){
    return ["aa","bb","cc"]
}

    

}
